//------------------------------------------------------------------------------
// <copyright file="DownloadUpdatesProgressChangedEventArgs.cs" company="Damian Antonowicz">
//       copyright © 2010 Damian Antonowicz
// </copyright>
// <author>Damian Antonowicz</author>
// <email>poczta@damianantonowicz.pl</email>
//------------------------------------------------------------------------------

using System;
using System.ComponentModel;

namespace DAnton.Blocks.Updater
{
    public class DownloadUpdatesProgressChangedEventArgs : ProgressChangedEventArgs
    {
        public long TotalBytes { get; private set; }
        public long TotalMegaBytes { get; private set; }
        public long BytesReaded { get; private set; }

        /// <summary>
        /// Transfer rate in kB/s.
        /// </summary>
        public double TransferRate { get; private set; }

        public DownloadUpdatesProgressChangedEventArgs(int percentage, 
                                                       long totalBytes,
                                                       long totalMegaBytes,
                                                       long bytesReaded, 
                                                       double transferRate)
            :base(percentage, null)
        {
            this.TotalBytes = totalBytes;
            this.TotalMegaBytes = totalMegaBytes;
            this.BytesReaded = bytesReaded;
            this.TransferRate = transferRate;
        }
    }
}
